# -*- coding: UTF-8 -*-
"""
@version: 1.0
@PackageName: ApiAutoTest01 - tencent_test1.py
@author: beixun
@Description: 
@since 2025/11/10 16:32
"""
import requests
import pytest
from jsonschema import validate
class ATest:
    def test(self):
        url = "https://galileotelemetry.tencent.com/collect"
        r = requests.post(url=url)
        rsp = r.json()
        assert rsp['code']==0,"code信息有误"
        assert rsp['msg']=="ok",rsp['msg']


    def test1(self):
        url = "https://otheve.beacon.qq.com/analytics/v2_upload?appkey=JS0081LY3JY6J3"
        r = requests.post(url=url)
        rsp = r.json()
        json_schema = {
            "type":"object",
            "properties":{
                "error-type":{
                    "type":"string"
                }
            }
        }
        validate(rsp,json_schema)
